class Solution1 {
    public boolean isPalindrome(int x) {
        if(x < 0) return false;
        if(x <= 9) return true;
        int tmp = x;
        int hw = 0;
        while(tmp > 0){
            hw = hw * 10 + tmp % 10;
            tmp /= 10;
        }
        return x == hw;
    }
}
